import http from "@/utils/http.js"

const url = {
    // 新增运输车
    addVehicle: "/vehicle/addVehicle",
    // 修改运输车
    updateVehicle: "/vehicle/updateVehicle",
    // 分页查询运输车
    pageList: "/vehicle/pageList",
    // 删除运输车
    deleteVehicle: "/vehicle/deleteVehicle/",
    // 查看该车辆转运记录
    transportRecord: "/vehicle/transportRecord",
}

export default {
    url: url,
    // 新增运输车
    addVehicle(params) {
        return http.post(url.addVehicle, params)
    },
    // 修改运输车
    updateVehicle(params) {
        return http.post(url.updateVehicle, params)
    },
    // 分页查询运输车
    pageList(params) {
        return http.post(url.pageList, params)
    },
    // 删除运输车
    deleteVehicle(params) {
        return http.post(url.deleteVehicle + params.id)
    },
    // 查看该车辆转运记录
    transportRecord(params) {
        return http.post(url.transportRecord, params)
    },
}